<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>GSoC2011SfM: D:/Travail/These/Determination caracteristiques camera/GSoC/SfM/src/CameraPinhole.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">GSoC2011SfM
   &#160;<span id="projectnumber">0.1</span>
   </div>
   <div id="projectbrief">Google Summer of Code 2011: Structure from motion</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">D:/Travail/These/Determination caracteristiques camera/GSoC/SfM/src/CameraPinhole.h</div>  </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef _GSOC_SFM_CAMERA_PINHOLE_H</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define _GSOC_SFM_CAMERA_PINHOLE_H 1</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="comment">//A lot of methods are inspired of LIBMV project ( http://code.google.com/p/libmv_core/ )</span>
<a name="l00005"></a>00005 
<a name="l00006"></a>00006 <span class="preprocessor">#include &quot;macro.h&quot;</span> <span class="comment">//SFM_EXPORTS</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include &quot;opencv2/calib3d/calib3d.hpp&quot;</span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &quot;Camera.h&quot;</span>
<a name="l00009"></a>00009 
<a name="l00010"></a>00010 <span class="keyword">namespace </span>OpencvSfM{
<a name="l00011"></a>00011   <span class="keyword">enum</span> paramsOfIntraParameters{
<a name="l00012"></a>00012     FOCAL_PARAM=1,         
<a name="l00013"></a>00013     SKEW_PARAM=2,          
<a name="l00014"></a>00014     PRINCIPAL_POINT_PARAM=4
<a name="l00015"></a>00015   };
<a name="l00016"></a>00016 
<a name="l00024"></a><a class="code" href="class_opencv_sf_m_1_1_camera_pinhole.html">00024</a>   <span class="keyword">class </span>SFM_EXPORTS <a class="code" href="class_opencv_sf_m_1_1_camera_pinhole.html" title="This class represent the physical device which take the pictures. It is not related to a 3D position ...">CameraPinhole</a>:<span class="keyword">public</span> <a class="code" href="class_opencv_sf_m_1_1_camera.html" title="This class represent the physical device which take the pictures. It is not related to a 3D position ...">Camera</a>{
<a name="l00025"></a>00025   <span class="keyword">protected</span>:
<a name="l00026"></a><a class="code" href="class_opencv_sf_m_1_1_camera_pinhole.html#ac60a2fb4ca15534d0b361628837f9286">00026</a>     cv::Mat <a class="code" href="class_opencv_sf_m_1_1_camera_pinhole.html#ac60a2fb4ca15534d0b361628837f9286" title="store intra parameters( 3*3 matrix ). This matrix contains focal informations, principal point coordi...">intra_params_</a>;
<a name="l00027"></a><a class="code" href="class_opencv_sf_m_1_1_camera_pinhole.html#ad6bf92278db0c35e220accd087a05701">00027</a>     cv::Mat <a class="code" href="class_opencv_sf_m_1_1_camera_pinhole.html#ad6bf92278db0c35e220accd087a05701" title="This is the inverse transformation of intra_params_. Used to speed up calculus...">inv_intra_params_</a>;
<a name="l00028"></a>00028 
<a name="l00034"></a><a class="code" href="class_opencv_sf_m_1_1_camera_pinhole.html#a024b01688fee19c5c2d592f4060d6063">00034</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="class_opencv_sf_m_1_1_camera_pinhole.html#a024b01688fee19c5c2d592f4060d6063">estimation_needed_</a>;
<a name="l00035"></a>00035   <span class="keyword">public</span>:
<a name="l00041"></a>00041     <a class="code" href="class_opencv_sf_m_1_1_camera_pinhole.html" title="This class represent the physical device which take the pictures. It is not related to a 3D position ...">CameraPinhole</a>( cv::Mat intra_params=cv::Mat::eye( 3, 3, CV_64F ),<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> wantedEstimation=FOCAL_PARAM|SKEW_PARAM|PRINCIPAL_POINT_PARAM );
<a name="l00051"></a>00051     <a class="code" href="class_opencv_sf_m_1_1_camera_pinhole.html" title="This class represent the physical device which take the pictures. It is not related to a 3D position ...">CameraPinhole</a>( <span class="keyword">const</span> std::vector&lt;std::vector&lt;cv::Point3f&gt; &gt;&amp; objectPoints, <span class="keyword">const</span> std::vector&lt;std::vector&lt;cv::Point2f&gt; &gt;&amp; imagePoints, cv::Size imageSize, <span class="keywordtype">double</span> aspectRatio=1.,<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> wantedEstimation=FOCAL_PARAM|SKEW_PARAM|PRINCIPAL_POINT_PARAM );
<a name="l00052"></a>00052     ~<a class="code" href="class_opencv_sf_m_1_1_camera_pinhole.html" title="This class represent the physical device which take the pictures. It is not related to a 3D position ...">CameraPinhole</a>( );
<a name="l00053"></a>00053 
<a name="l00059"></a>00059     <span class="keywordtype">void</span> updateIntrinsicMatrix( cv::Mat newParams,<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> intraValues=FOCAL_PARAM|SKEW_PARAM|PRINCIPAL_POINT_PARAM );
<a name="l00060"></a>00060 
<a name="l00064"></a>00064     <span class="keyword">virtual</span> std::vector&lt;cv::Vec4d&gt; convertFromImageTo3Dray( std::vector&lt;cv::Vec3d&gt; points );
<a name="l00065"></a>00065     
<a name="l00071"></a>00071     <span class="keyword">virtual</span> std::vector&lt;cv::Vec2d&gt; pixelToNormImageCoordinates( std::vector&lt;cv::Vec2d&gt; points ) <span class="keyword">const</span>;
<a name="l00077"></a>00077     <span class="keyword">virtual</span> std::vector&lt;cv::Vec2d&gt; normImageToPixelCoordinates( std::vector&lt;cv::Vec2d&gt; points ) <span class="keyword">const</span>;
<a name="l00082"></a><a class="code" href="class_opencv_sf_m_1_1_camera_pinhole.html#a46eae27e8e2d4f25f1c64fa4d2d9b1eb">00082</a>     <span class="keyword">virtual</span> cv::Mat getIntraMatrix( )<span class="keyword"> const</span>
<a name="l00083"></a>00083 <span class="keyword">    </span>{<span class="keywordflow">return</span> intra_params_;};
<a name="l00089"></a>00089     <span class="keyword">virtual</span> <span class="keywordtype">double</span> getFocal( ) <span class="keyword">const</span>;
<a name="l00090"></a>00090     
<a name="l00095"></a>00095     <span class="keyword">static</span> cv::Ptr&lt;Camera&gt; read( <span class="keyword">const</span> cv::FileNode&amp; node );
<a name="l00096"></a>00096     
<a name="l00101"></a>00101     <span class="keyword">virtual</span> <span class="keywordtype">void</span> write( cv::FileStorage&amp; fs ) <span class="keyword">const</span>;
<a name="l00102"></a>00102 
<a name="l00103"></a>00103   };
<a name="l00104"></a>00104 
<a name="l00105"></a>00105 };
<a name="l00106"></a>00106 
<a name="l00107"></a>00107 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Sun Aug 21 2011 16:45:52 for GSoC2011SfM by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
